package cn.com.nes.mybatis.callcenter.entity;

import cn.com.nes.site.entity.vo.BaseVO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 工单表
 */
@TableName(value = "work_order_info")
@Data
public class WorkOrderInfo extends BaseVO {

    /**
     * 工单id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 企业id
     */
    @TableField(value = "company_id")
    private Long companyId;

    /**
     * 房屋id
     */
    @TableField(value = "house_id")
    private Long houseId;

    /**
     * 客户id
     */
    @TableField(value = "clientele_id")
    private Long clienteleId;

    /**
     * 创建人id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 联系人姓名
     */
    @TableField(value = "contact")
    private String contact;

    /**
     * 联系人电话
     */
    @TableField(value = "contact_phone")
    private String contactPhone;

    /**
     * 任务类型id
     */
    @TableField(value = "work_type_id")
    private Long workTypeId;

    /**
     * 紧急程度id
     */
    @TableField(value = "emergency_degree_id")
    private Integer emergencyDegreeId;

    /**
     * 设备生产公司id
     */
    @TableField(value = "equipment_company_id")
    private Long equipmentCompanyId;

    /**
     * 设备ids ;  关联设备信息表ids,多个设备使用";"隔开
     */
    @TableField(value = "equipment_ids")
    private String equipmentIds;

    /**
     * 是否修改
     */
    @TableField(value = "is_xg")
    private Integer isXg;

    /**
     * 设备ids ;  关联设备信息表ids,多个设备使用";"隔开
     */
    @TableField(value = "equipment_ids_tmp")
    private String equipmentIdsTmp;

    /**
     * 工单地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 行政区划代码
     */
    @TableField(value = "xzqhdm")
    private String xzqhdm;

    /**
     * 描述
     */
    @TableField(value =  "`desc`")
    private String desc;

    /**
     * 业务支持人员id
     */
    @TableField(value = "maintain_id")
    private Long maintainId;

    /**
     * 业务支持人员状态
     */
    @TableField(value = "maintain_status")
    private Integer maintainStatus;

    /**
     * 状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 逻辑删除:   1 表示删除，0 表示未删除。
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create")
    private Long gmtCreate;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_modified")
    private Long gmtModified;

    /**
     * 处理方式id
     */
    @TableField(value = "handle_type_id")
    private Integer handleTypeId;

    /**
     * 处理方式描述
     */
    @TableField(value = "handle_desc")
    private String handleDesc;

    /**
     * 图片地址
     */
    @TableField(value = "images")
    private String images;

    /**
     * 工单来源   0 工单  1故障  2预警
     */
    @TableField(value = "handle_mode")
    private Integer handleMode;

    /**
     * 错误代码
     */
    @TableField(value = "erro_code")
    private String erroCode;

    /**
     * 处理id
     */
    @TableField(value = "handle_id")
    private Long handleId;

    /**
     * 评分
     */
    @TableField(value = "score")
    private Integer score;

    /**
     * 工单类型 1.维修工单 2.通用工单
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 满意度 0 不满意 1 满意
     */
    @TableField(value = "satisfaction")
    private Integer satisfaction;

    /**
     *
     */
    @TableField(value = "problem_type_id")
    private String problemTypeId;

    /**
     *
     */
    @TableField(value = "processor_agencies")
    private Integer processorAgencies;

    /**
     * 外部工单id
     */
    @TableField(value = "external_order_id")
    private String externalOrderId;

    /**
     *
     */
    @TableField(value = "fault_repair_type")
    private String faultRepairType;

    /**
     * 0-待审核, 1-已审核
     */
    @TableField(value = "audited")
    private Integer audited;

    /**
     * 超时类型
     */
    @TableField(value = "timeout_type")
    private Integer timeoutType;

    /**
     * 超时罚金
     */
    @TableField(value = "fines")
    private Integer fines;

    /**
     * 审核员id
     */
    @TableField(value = "auditor_id")
    private Long auditorId;

    /**
     * 审核意见
     */
    @TableField(value = "audit_comment")
    private String auditComment;

    /**
     * 审核是否合格，1-合格，0-不合格
     */
    @TableField(value = "qualified")
    private Integer qualified;

    /**
     * 重新派单的工单id
     */
    @TableField(value = "reassignment_id")
    private Long reassignmentId;

    /**
     *
     */
    @TableField(value = "longitude")
    private BigDecimal longitude;

    /**
     *
     */
    @TableField(value = "latitude")
    private BigDecimal latitude;

    /**
     * 设备质保 质保内（01）质保外（02）、不选（空白字符串）
     */
    @TableField(value = "sb_sfzb")
    private String sbSfzb;

    /**
     * 咨询工单，咨询类型，字典表consultType
     */
    @TableField(value = "consult_type")
    private String consultType;

    /**
     * 工单问题分类 字典表AppealCategory其中 01代表故障类、02代表售后服务类
     */
    @TableField(value = "appeal_category")
    private String appealCategory;

    /**
     * 工单问题分类细类   字典表WorkOrderEvaluation
     */
    @TableField(value = "evaluation")
    private String evaluation;

    /**
     * 上门维修验证码
     */
    @TableField(value = "verification_code")
    private String verificationCode;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 销售订单id
     */
    @TableField(value = "sale_order_id")
    private Long saleOrderId;

    /**
     * 系统单id
     */
    @TableField(value = "price_master_id")
    private Long priceMasterId;

    /**
     * 热链云客户id
     */
    @TableField(value = "customer_id")
    private String customerId;

    /**
     * 门牌号
     */
    @TableField(value = "house_number")
    private String houseNumber;

    /**
     * 安装工单名称
     */
    @TableField(value = "work_order_name")
    private String workOrderName;

    /**
     * 安装施工状态
     */
    @TableField(value = "install_state")
    private Integer installState;

    /**
     * 安装日期
     */
    @TableField(value = "install_date")
    private Date installDate;

    /**
     * 质保年份(年)
     */
    @TableField(value = "quality_guarantee_years")
    private String qualityGuaranteeYears;

    /**
     * 采购案源
     */
    @TableField(value = "procure_source")
    private Integer procureSource;

    /**
     * 购置资金
     */
    @TableField(value = "procure_fund")
    private BigDecimal procureFund;

    /**
     * 约定上门时间-开始
     */
    @TableField(value = "agreed_doorstep_time_start")
    private Date agreedDoorstepTimeStart;

    /**
     * 约定上门时间-结束
     */
    @TableField(value = "agreed_doorstep_time_end")
    private Date agreedDoorstepTimeEnd;

    /**
     * 项目id
     */
    @Deprecated
    @TableField(value = "project_id")
    private Long projectId;

    /**
     * 热链云客户房屋id
     */
    @TableField(value = "customer_house_id")
    private Long customerHouseId;
    //派单时距离终点的距离
    @TableField(value = "distance")
    private Integer distance;
    // 维修价格
    @TableField(value = "repairPrice")
    private BigDecimal repairPrice;
    //起步距离
    @TableField(value = "baseDistance")
    private BigDecimal baseDistance;
    //每公里价格
    @TableField(value = "pricePerKM")
    private BigDecimal pricePerKM;
    //是否往返, 0否1是
    @TableField(value = "roundTrip")
    private Integer roundTrip;
    // 故障是否修理完毕, 0-已修好, 1-未修好, 2-等待配件
    @TableField(value = "repair_result")
    private Integer repairResult;
    //是否收费, 0-未收费, 1-收费
    @TableField(value = "charged")
    private Integer charged;
    //冷媒类型
    @TableField(value = "refrigerant_type")
    private String refrigerantType;
    //冷媒总价格
    @TableField(value = "refrigerant_price")
    private BigDecimal refrigerantPrice;
    //冷媒数量
    @TableField(value = "refrigerant_amount")
    private BigDecimal refrigerantAmount;
    //责任方
    @TableField(value = "personliable")
    private String personliable;
    //工单关闭原因
    @TableField(value = "closingreason")
    private String closingreason;
    //支付状态,0-待支付,1-已支付
    @TableField(value = "payment_state")
    private Integer paymentState;
    @TableField(value = "faultType")
    private Integer faultType;
    //0是长效管护创建的维修工单1是热链云创建的维修工单
    @TableField(value = "system_type")
    private Integer systemType;
    //转单的父Id
    @TableField(value = "p_work_order_id")
    private Long pWorkOrderId;
}